package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MetallurgicalSampleMapper;
import com.ruoyi.system.domain.MetallurgicalSample;
import com.ruoyi.system.service.IMetallurgicalSampleService;
import com.ruoyi.common.core.text.Convert;

/**
 * 冶金实验室样品信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-22
 */
@Service
public class MetallurgicalSampleServiceImpl implements IMetallurgicalSampleService 
{
    @Autowired
    private MetallurgicalSampleMapper metallurgicalSampleMapper;

    /**
     * 查询冶金实验室样品信息
     * 
     * @param sampleId 冶金实验室样品信息主键
     * @return 冶金实验室样品信息
     */
    @Override
    public MetallurgicalSample selectMetallurgicalSampleBySampleId(Long sampleId)
    {
        return metallurgicalSampleMapper.selectMetallurgicalSampleBySampleId(sampleId);
    }

    /**
     * 查询冶金实验室样品信息列表
     * 
     * @param metallurgicalSample 冶金实验室样品信息
     * @return 冶金实验室样品信息
     */
    @Override
    public List<MetallurgicalSample> selectMetallurgicalSampleList(MetallurgicalSample metallurgicalSample)
    {
        return metallurgicalSampleMapper.selectMetallurgicalSampleList(metallurgicalSample);
    }

    /**
     * 新增冶金实验室样品信息
     * 
     * @param metallurgicalSample 冶金实验室样品信息
     * @return 结果
     */
    @Override
    public int insertMetallurgicalSample(MetallurgicalSample metallurgicalSample)
    {
        return metallurgicalSampleMapper.insertMetallurgicalSample(metallurgicalSample);
    }

    /**
     * 修改冶金实验室样品信息
     * 
     * @param metallurgicalSample 冶金实验室样品信息
     * @return 结果
     */
    @Override
    public int updateMetallurgicalSample(MetallurgicalSample metallurgicalSample)
    {
        return metallurgicalSampleMapper.updateMetallurgicalSample(metallurgicalSample);
    }

    /**
     * 批量删除冶金实验室样品信息
     * 
     * @param sampleIds 需要删除的冶金实验室样品信息主键
     * @return 结果
     */
    @Override
    public int deleteMetallurgicalSampleBySampleIds(String sampleIds)
    {
        return metallurgicalSampleMapper.deleteMetallurgicalSampleBySampleIds(Convert.toStrArray(sampleIds));
    }

    /**
     * 删除冶金实验室样品信息信息
     * 
     * @param sampleId 冶金实验室样品信息主键
     * @return 结果
     */
    @Override
    public int deleteMetallurgicalSampleBySampleId(Long sampleId)
    {
        return metallurgicalSampleMapper.deleteMetallurgicalSampleBySampleId(sampleId);
    }
}
